package pa.iscde.core.editor;

import pa.iscde.core.service.EditorServices;
import pt.iscte.pidesco.filebrowser.model.ClassElement;
import pt.iscte.pidesco.filebrowser.model.SourceElement;
import pt.iscte.pidesco.filebrowser.service.SourceTreeListener;

public class OpenEditorListener implements SourceTreeListener {

	@Override
	public void selectionChanged(Iterable<SourceElement> selection) {
	
	}

	@Override
	public void doubleClick(SourceElement element) {
		if(element instanceof ClassElement)
			EditorServices.openFile(((ClassElement) element).getFile());
			EditorServices.selectText(((ClassElement) element).getFile(), 4, 10);
	}

}
